package com.kun.service_cms.controller;


import com.kun.service_cms.entity.CrmBanner;
import com.kun.service_cms.service.CrmBannerService;
import com.kun.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author dmk
 * @since 2021-10-22
 */
@RestController
@RequestMapping("/service_cms/crm-banner")
@CrossOrigin
public class BannerFrontController {
    @Autowired
    private CrmBannerService crmBannerService;
    @GetMapping("getBanner")
    public R getBanner(){
        List<CrmBanner> list = crmBannerService.selectAllBanner();
        return R.ok().data("list",list);
    }
}

